﻿using Birkelund.QueryStrings.Internals;
using System.Diagnostics;

namespace Birkelund.QueryStrings
{
    /// <summary>
    /// Class to represent a weakly typed querystring token
    /// </summary>
    [DebuggerDisplay("Key: {Key} - Value: {Value}")]
    public class TokenKeyValue
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="key">The key</param>
        /// <param name="value">The value</param>
        public TokenKeyValue(string key, string value)
        {
            //null is allowed for a key

            Key = key;

            if (value == null)
            {
                value = string.Empty;
            }
            Value = value;
        }

        /// <summary>
        /// The key
        /// </summary>
        public string Key { get; private set; }
        /// <summary>
        /// The value
        /// </summary>
        public string Value { get; private set; }
    }
}
